import os

from django.conf.urls import patterns, include, url
from django.contrib import admin

#DIR_HERE = os.path.dirname(__file__)
from contacts.settings.base import BASE_DIR

admin.autodiscover()

urlpatterns = patterns(
    '',
    # Examples:
    # url(r'^$', 'contacts.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^user_contacts/',
        include('user_contacts.urls', namespace="user_contacts")),
    url(r'^news/',
        include('news.urls', namespace="news")),
    url(r'^polls/',
        include('polls.urls', namespace="polls")),
    ##url(r'^ipmac/', include('ipmaclog.urls', namespace="ipmac")),
    url(r'^.*/\d+/author_headshots/(?P<path>.*)$',
        'django.views.static.serve',
        {'document_root': BASE_DIR + '/media/author_headshots/'}),
    url(r'^book/',
        include('books.urls', namespace="book")),
    url(r'^static0/js/(?P<path>.*)$',
        'django.views.static.serve',
        {'document_root': BASE_DIR + "/static0/js/"}),
    url(r'^index/$',
        'contacts.views.first_page'),
    url(r'^admin/',
        include(admin.site.urls)),
    url(r'login/$',
        'django.contrib.auth.views.login', name='login'),
)
